#pragma once

class CMainPage : public CDialogImpl<CMainPage>
{
public:
	CMainPage();   // standard constructor
	virtual ~CMainPage();

// Dialog Data
	enum { IDD = IDD_MAIN_DIALOG };

protected:
	BEGIN_MSG_MAP(CMainPage)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		MESSAGE_HANDLER(WM_TIMER, OnTimer)
	END_MSG_MAP()
	DECLARE_UIG_MESSAGE_MAP(CMainPage)

public:
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	void InitPosTab();
	void InitStoreTab();
	void InitShopTab();
	void LeftTabSelected(IUIGearsControl* pCtrl, int selectedIndex);
	void OrderChanged(IUIGearsControl* pCtrl, int selectedIndex);
	void MainTabSelected(IUIGearsControl* pCtrl, int groupId);
	void UpdateList(IUIGearsControl* pCtrl, IUIGearsControl* pTemp, int index);
	void ItemDown(IUIGearsControl* pCtrl, int selIndex);
	void BtnClicked(IUIGearsControl* pCtrl);
private:
	UIGears::IUIGTemplateList*			m_itemList;
	UIGears::IUIGearsWindow*	m_pWindow;
	UIGears::IUIGRadioBox*			m_radPOS;
	UIGears::IUIGRadioBox*			m_radStore;
	UIGears::IUIGRadioBox*			m_shopSetting;
	UIGears::IUIGTab*			m_leftTab;
	UIGears::IUIGContainer*			m_saleCon;
	UIGears::IUIGLabel*			m_labTime;
	UIGears::IUIGLabel*			m_total;
	UIGears::IUIGTemplateList*			m_orderList;
	UIGears::IUIGTab*			m_orderTab;
	UIGears::IUIGButton*			m_btnPlus;
	UIGears::IUIGContainer*			m_StoreCon;
	UIGears::IUIGContainer*			m_ShopCon;

};
